<?php
$id=$_GET['id'];
//echo $id;
$filename="$id.html";
if(file_exists($filename))
{
    echo "静态化";
    include $filename;
}
else{
    $dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
    $sql="select * from articless where id=".$id;
    $arr=$dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
    ob_start();
    file_put_contents($filename,ob_get_clean());
    include "moban.php";
    include $filename;
}